Micron Document
<!DOCTYPE html>
<html class="client-nojs vector-feature-night-mode-disabled vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-sticky-header-enabled" lang="en" dir="ltr"><head>
<meta charset="UTF-8">
<title>Shim (computing)</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://en.wikipedia.org/wiki/Shim_(computing)"> <link href="./mw/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/user.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./mw/site.styles.css">
<link rel="stylesheet" type="text/css" href="./mw/noscript.css">
<link rel="stylesheet" type="text/css" href="./footer.css">
<link rel="stylesheet" type="text/css" href="./vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Shim_computing rootpage-Shim_computing skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">
<span id="openzim-page-title" class="mw-page-title-main"><span class="mw-page-title-main">Shim (computing)</span></span>
</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr">
<style data-mw-deduplicate="TemplateStyles:r1236090951">
/* start https://en.wikipedia.org/ */


.mw-parser-output .hatnote{font-style:italic}.mw-parser-output div.hatnote{padding-left:1.6em;margin-bottom:0.5em}.mw-parser-output .hatnote i{font-style:normal}.mw-parser-output .hatnote+link+.hatnote{margin-top:-0.5em}@media print{body.ns-0 .mw-parser-output .hatnote{display:none!important}}


/* end https://en.wikipedia.org/ */
</style><div role="note" class="hatnote navigation-not-searchable">Not to be confused with shm, an abbreviation for <a href="Shared_memory" title="Shared memory">shared memory</a>, often pronounced "shim", or a <a href="CPU_shim" title="CPU shim">CPU shim</a>, a physical spacer for a heat sink.</div>
<div role="note" class="hatnote navigation-not-searchable">For other uses, see <a href="Shim_(disambiguation)" class="mw-redirect mw-disambig" title="Shim (disambiguation)">Shim (disambiguation)</a>.</div>
<style data-mw-deduplicate="TemplateStyles:r1251242444">
/* start https://en.wikipedia.org/ */


.mw-parser-output .ambox{border:1px solid #a2a9b1;border-left:10px solid #36c;background-color:#fbfbfb;box-sizing:border-box}.mw-parser-output .ambox+link+.ambox,.mw-parser-output .ambox+link+style+.ambox,.mw-parser-output .ambox+link+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+style+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+link+.ambox{margin-top:-1px}html body.mediawiki .mw-parser-output .ambox.mbox-small-left{margin:4px 1em 4px 0;overflow:hidden;width:238px;border-collapse:collapse;font-size:88%;line-height:1.25em}.mw-parser-output .ambox-speedy{border-left:10px solid #b32424;background-color:#fee7e6}.mw-parser-output .ambox-delete{border-left:10px solid #b32424}.mw-parser-output .ambox-content{border-left:10px solid #f28500}.mw-parser-output .ambox-style{border-left:10px solid #fc3}.mw-parser-output .ambox-move{border-left:10px solid #9932cc}.mw-parser-output .ambox-protection{border-left:10px solid #a2a9b1}.mw-parser-output .ambox .mbox-text{border:none;padding:0.25em 0.5em;width:100%}.mw-parser-output .ambox .mbox-image{border:none;padding:2px 0 2px 0.5em;text-align:center}.mw-parser-output .ambox .mbox-imageright{border:none;padding:2px 0.5em 2px 0;text-align:center}.mw-parser-output .ambox .mbox-empty-cell{border:none;padding:0;width:1px}.mw-parser-output .ambox .mbox-image-div{width:52px}@media(min-width:720px){.mw-parser-output .ambox{margin:0 10%}}@media print{body.ns-0 .mw-parser-output .ambox{display:none!important}}


/* end https://en.wikipedia.org/ */
</style>

<p>In <a href="Computer_programming" title="Computer programming">computer programming</a>, a <b>shim</b> is a <a href="Library_(computer_science)" class="mw-redirect" title="Library (computer science)">library</a> that <a href="Transparency_(human%E2%80%93computer_interaction)" title="Transparency (human–computer interaction)">transparently</a> intercepts <a href="Application_programming_interface" class="mw-redirect" title="Application programming interface">API</a> calls and changes the arguments passed, handles the operation itself or redirects the operation elsewhere.<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup> Shims can be used to support an old API in a newer environment, or a new API in an older environment. Shims can also be used for running programs on different software platforms than they were developed for.
</p><p>Shims for older APIs typically come about when the behavior of an API changes, thereby causing compatibility issues for older applications which still rely on the older functionality; in such cases, the older API can still be supported by a thin <a href="Compatibility_layer" title="Compatibility layer">compatibility layer</a> on top of the newer code. Shims for newer APIs are defined as: "a <a href="Library_(computing)" title="Library (computing)">library</a> that brings a new API to an older environment, using only the means of that environment."<sup id="cite_ref-speakingjs_3-0" class="reference"><a href="#cite_note-speakingjs-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup>
</p>
<meta property="mw:PageProp/toc">
<div class="mw-heading mw-heading2"><h2 id="Examples">Examples</h2></div>
<ul><li>Web <a href="Polyfill_(programming)" title="Polyfill (programming)">polyfills</a> implement newer <a href="Web_standard" class="mw-redirect" title="Web standard">web standards</a> using older standards and <a href="JavaScript" title="JavaScript">JavaScript</a>, if the newer standard is not available in a given <a href="Web_browser" title="Web browser">web browser</a>.<sup id="cite_ref-speakingjs_3-1" class="reference"><a href="#cite_note-speakingjs-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup></li>
<li>Support of <a href="AppleTalk" title="AppleTalk">AppleTalk</a> on <a href="Apple_Macintosh" class="mw-redirect" title="Apple Macintosh">Macintosh</a> computers, during the brief period in which <a href="Apple_Computer" class="mw-redirect" title="Apple Computer">Apple Computer</a> supported the <a href="Open_Transport" title="Open Transport">Open Transport</a> networking system. Thousands of Mac programs were based on the AppleTalk protocol; to support these programs, AppleTalk was re-implemented as an OpenTransport "stack", and then re-implemented as an API shim on top of this new library.</li>
<li>The <a href="Microsoft_Windows" title="Microsoft Windows">Microsoft Windows</a> Application Compatibility Toolkit (ACT) uses the term to mean <a href="Backward_compatibility" title="Backward compatibility">backward compatible</a> libraries. Shims simulate the behavior of older versions of Windows for legacy applications that rely on incorrect or deprecated functionality, or correct the way in which poorly written applications call unchanged APIs, for example to fix <a href="Principle_of_least_privilege" title="Principle of least privilege">least-privileged user account (LUA)</a> <a href="Software_bug" title="Software bug">bugs</a>.<sup id="cite_ref-4" class="reference"><a href="#cite_note-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup></li>
<li>bind.so is a shim library for <a href="Linux" title="Linux">Linux</a> that allows any application, regardless of permissions, to bind to a listening socket or specify outgoing IP address.<sup id="cite_ref-5" class="reference"><a href="#cite_note-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup> It uses the <a href="LD_PRELOAD" class="mw-redirect" title="LD PRELOAD">LD_PRELOAD</a> mechanism, which allows shims and other libraries to be loaded into any program.</li>
<li>In the <i>type tunnel</i> pattern, a generic interface layer uses a family of shims to translate a heterogeneous set of types to a single primitive type used by an underlying API.<sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup></li></ul>
<div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2></div>
<ul><li><a href="Adapter_pattern" title="Adapter pattern">Adapter pattern</a></li>
<li><a href="Application_virtualization" title="Application virtualization">Application virtualization</a></li>
<li><a href="Driver_wrapper" title="Driver wrapper">Driver wrapper</a></li>
<li><a href="Glide_wrapper" class="mw-redirect" title="Glide wrapper">Glide wrapper</a></li>
<li><a href="Glue_code" title="Glue code">Glue code</a></li>
<li><a href="Stub_(computer_science)" class="mw-redirect" title="Stub (computer science)">Stub (computer science)</a></li>
<li><a href="Thunk_(compatibility_mapping)" class="mw-redirect" title="Thunk (compatibility mapping)">Thunk (compatibility mapping)</a></li>
<li><a href="Windows_on_Windows" title="Windows on Windows">Windows on Windows</a> (WoW)</li>
<li><a href="Wrapper_function" title="Wrapper function">Wrapper function</a></li>
<li><a href="Wrapper_library" title="Wrapper library">Wrapper library</a></li></ul>
<div class="mw-heading mw-heading2"><h2 id="References">References</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1239543626">
/* start https://en.wikipedia.org/ */


.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}


/* end https://en.wikipedia.org/ */
</style><div class="reflist reflist-columns references-column-width" style="column-width: 30em;">
<ol class="references">
<li id="cite_note-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-1">^</a></b></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">
/* start https://en.wikipedia.org/ */


.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("./mw/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("./mw/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("./mw/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("./mw/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}


/* end https://en.wikipedia.org/ */
</style><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20140407082502/http://www.computerworld.com/s/article/9133382/Your_company_s_apps_incompatible_with_Windows_7_Shim_them_says_Microsoft%26displaylang%3Den">"Your company's apps incompatible with Windows 7? Shim them, says Microsoft"</a>. <a href="Computerworld" title="Computerworld">Computerworld</a>. 2009-03-21. Archived from <a rel="nofollow" class="external text" href="http://www.computerworld.com/s/article/9133382/Your_company_s_apps_incompatible_with_Windows_7_Shim_them_says_Microsoft%26displaylang%3Den">the original</a> on 2014-04-07<span class="reference-accessdate">. Retrieved <span class="nowrap">2014-04-05</span></span>.</cite></span>
</li>
<li id="cite_note-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-2">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://blogs.technet.com/b/askperf/archive/2011/06/17/demystifying-shims-or-using-the-app-compat-toolkit-to-make-your-old-stuff-work-with-your-new-stuff.aspx&amp;displaylang=en">"Demystifying Shims - or - Using the App Compat Toolkit to make your old stuff work with your new stuff"</a>. <a href="Microsoft_TechNet" title="Microsoft TechNet">Microsoft TechNet</a>. 2011-06-17<span class="reference-accessdate">. Retrieved <span class="nowrap">2014-04-05</span></span>.</cite></span>
</li>
<li id="cite_note-speakingjs-3"><span class="mw-cite-backlink">^ <a href="#cite_ref-speakingjs_3-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-speakingjs_3-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFAxel_Rauschmayer2014" class="citation book cs1">Axel Rauschmayer (2014). <a rel="nofollow" class="external text" href="http://speakingjs.com/"><i>Speaking JavaScript</i></a>. <a rel="nofollow" class="external text" href="http://speakingjs.com/es5/ch30.html#id1267739">Shims Versus Polyfills</a>.</cite></span>
</li>
<li id="cite_note-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-4">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=24da89e9-b581-47b0-b45e-492dd6da2971&amp;displaylang=en">"Microsoft Application Compatibility Toolkit 5.0"</a>. <a href="Microsoft" title="Microsoft">Microsoft</a>. 2007-12-11<span class="reference-accessdate">. Retrieved <span class="nowrap">2008-06-24</span></span>.</cite></span>
</li>
<li id="cite_note-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-5">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20140330151653/http://www.ryde.net/code/bind.c.txt">"Source code of bind.so"</a>. Daniel Ryde. 2010-01-09. Archived from <a rel="nofollow" class="external text" href="http://www.ryde.net/code/bind.c.txt">the original</a> on 2014-03-30<span class="reference-accessdate">. Retrieved <span class="nowrap">2014-04-05</span></span>.</cite></span>
</li>
<li id="cite_note-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-6">^</a></b></span> <span class="reference-text"><cite id="CITEREFWilson2003" class="citation cs2">Wilson, Matthew (August 2003), <a rel="nofollow" class="external text" href="http://www.drdobbs.com/cpp/184401689">"Generalized String Manipulation: Access Shims and Type Tunneling"</a>, <i>C/C++ Users Journal</i>, <b>21</b> (8)</cite></span>
</li>
</ol></div>
<div class="mw-heading mw-heading2"><h2 id="External_links">External links</h2></div>
<ul><li><a rel="nofollow" class="external text" href="http://msdn.microsoft.com/en-us/library/windows/desktop/hh848039(v=vs.85).aspx">Microsoft Dev-Center - Windows 8 Client and Server 2012 application Compatibility</a></li>
<li><a rel="nofollow" class="external text" href="https://technet.microsoft.com/en-us/library/dd837644(v=WS.10).aspx">Microsoft TechNet - Understanding Shims</a></li></ul></div><!--htdig_noindex--><div><div class="zim-footer">
This article is issued from <a class="external text" title="Last edited on 2025-03-30" href="https://en.wikipedia.org/wiki/?title=Shim_(computing)&amp;oldid=1283190337">Wikipedia</a>. The text is available under <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-Share Alike 4.0</a> unless otherwise noted. Additional terms may apply for the media files.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>

</body></html>